﻿// ===============================================================================
// Layout.cs
// WelcomeBox Web Framework - Demo
// ===============================================================================
// Copyright (c) EOS Development Group. All rights reserved.
// ===============================================================================

namespace NewsDemo.Webparts
{
    using EOS.Framework.Web.Mvc;

    public class WelcomeBox : WebPart
    {
        protected override void BeginRender()
        {
            if (WebContext.Current.Editor != null)
            {
                Markup.SetValue("user", WebContext.Current.Editor.Username);
            }
            else
            {
                Enable = false;
            }
        }
    }
}
